from app import db


# print(app.config["SQLALCHEMY_DATABASE_URI"])

class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String)
    password = db.Column(db.String)

    def __repr__(self):
        return '<User %r>' % {"username": self.username, "password": self.password}

    def get(self, data):
        return {"username": self.username, "password": self.password, "id": self.id}.get(data)


if __name__ == "__main__":
    pass
    user = User()
    data = user.query.filter_by(username="asdf").first()
    print(data.get("password"))
